﻿using System;
using DapperExtensions.Mapper;
using Newtonsoft.Json;
using ZLWeb.WebApiEntityBase;
using ZilLion.Service.Core.Domain.EntityBase.JsonConverter;

namespace ZL.CRM.CommonEntity.Common
{
    public class WalletAdd:ResponseResultInfo
    {
        //若开放Waccid字段，需注意对外返回时，应清空该字段（不能将accid暴露出去）
        ///// <summary>
        /////  账户id
        ///// </summary>
        //public int Waccid { get; set; }

        /// <summary>
        ///  操作对象：钱包号
        /// </summary>
        public string Oprwno { get; set; }


        /// <summary>
        ///  钱包核算营业日
        /// </summary>
        [JsonConverter(typeof(ChinaDateTimeConverter))]
        public DateTime? Oprskywdate { get; set; }

        /// <summary>
        ///  钱包核算机构id（收款核算对象id）(余额调整：虚拟机构)
        /// </summary>
        public int Oprskbrid { get; set; }

        /// <summary>
        ///  钱包核算机构名称
        /// </summary>
        public string Oprskbrname { get; set; }

        /// <summary>
        ///  钱包核算品牌id
        /// </summary>
        public int Oprskppid { get; set; }

        /// <summary>
        ///  钱包核算品牌名称
        /// </summary>
        public string Oprskppname { get; set; }
    }

    public class WalletAddMapper : ClassMapper<WalletAdd>
    {
        public WalletAddMapper()
        {
            Table("#walletadd");
            //Map(f => f.Waccid).Column("waccid");
            Map(f => f.Oprwno).Column("oprwno");
            Map(f => f.Oprskywdate).Column("oprskywdate");
            Map(f => f.Oprskbrid).Column("oprskbrid");
            Map(f => f.Oprskbrname).Column("oprskbrname");
            Map(f => f.Oprskppid).Column("oprskppid");
            Map(f => f.Oprskppname).Column("oprskppname");
        }
    }
}
